<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>官方通知</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <style>
        body,
        html {
            background: #fff;
        }

        .rung {
            width: 100%;
            height: 10px;
            background: #FAF9F9;
        }

        .wrap {
            width: 100%;
            padding: 0 15px;
            overflow: hidden;
            box-sizing: border-box;
        }

        .wrap ul {
            width: 100%;
            overflow: hidden;
        }

        .wrap ul li {
            width: 100%;
            overflow: hidden;
        }

        .news_top {
            display: flex;
            margin-top: 5px;
        }

        .message_icon {
            width: 30px;
            height: 30px;
            margin-top: 0.5px;
            align-items: center;
        }

        .message_icon img {
            width: 100%;
            height: 100%;
            display: block;
        }

        .news_top .title {
            height: 31px;
            padding-left: 10px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .news_top .title span {
            height: 12px;
            font-size: 14px;
            font-family: PingFang SC;
            font-weight: 500;
            color: #444444;
            line-height: 12px;
        }

        .news_top .title span:last-child {
            height: 12px;
            font-size: 12px;
            font-family: PingFang SC;
            font-weight: 500;
            color: #999999;
            line-height: 12px;
        }

        .new_content {
            width: 100%;
            display: flex;
            justify-content: space-between;
            overflow: hidden;
        }

        .new_content_l {
            width: 40px;
            overflow: hidden;
        }

        .new_content_r {
            flex: 1;
            padding: 9px 10px 11px 10px;
            background: #F0F1F7;
            border-radius: 10px;
            margin-top: 14.5px;
            font-size: 14px;
            font-family: PingFang SC;
            font-weight: 400;
            color: #000000;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="rung"></div>
        <div class="wrap">
            <ul>
                <li v-for='item in dataList'>
                    <div class="news_top">
                        <div class="message_icon">
                            <img src="../../image/message_icon.png" alt="">
                        </div>
                        <div class="title">
                            <span>{{item.title}}</span>
                            <span>2020-08-06 17:28</span>
                        </div>
                    </div>
                    <div class="new_content">
                        <div class="new_content_l"></div>
                        <div class="new_content_r" v-html='item.content'></div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/vue.js"></script>
<script type="text/javascript" src="../../script/cling.js"></script>
<script type="text/javascript">
    apiready = function() {
       vm.init()
    }
    var vm = new Vue({
      el:"#app",
      data:{
        offset:0,
        dataList:[]
      },
      methods:{
        init:function(isClick){
          if(isClick){
            vm.offset+=10;
          }else{
            vm.offset = 0;
          }
          api.ajax({
              url: cl.apiServer + 'message/getMessageList',
              method: 'post',
              headers: {
                  'Content-Type': 'application/json;charset=utf-8',
                  token: ''
              },
              data: {
                  body: {
                      limit:10,
                      offset:vm.offset,
                      version:cl.deviceInfo().appVersion,
                      mobileInfo:cl.systemType()
                  }
              }
          }, function(ret, err) {
              console.log(JSON.stringify(ret));
              if (ret) {
                  if (ret.code == 0) {
                    // vm.serviceInfo = ret.data[0];
                      vm.dataList = ret.data;
                  }
              }
          });
        }
      }
    })
</script>

</html>
